<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>API: yahoo  YAHOO.lang   (YUI Library)</title>
	<link rel="stylesheet" type="text/css" href="assets/api.css">
</head>

<body id="yahoo-com">
<div id="doc3" class="yui-t2">

	<div id="hd">
        <h1>Yahoo! UI Library</h1>
        <h3>YAHOO Global&nbsp; <span class="subtitle">2.2.2</span></h3>
        <p>
        <a href="./index.html">Yahoo! UI Library</a> 
            &gt; <a href="./module_yahoo.html">yahoo</a>
                 &gt; YAHOO.lang 
                
            </p>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">


                    <h2>
                        

                        
                        
                            Class <b>YAHOO.lang</b>
                        <span class="extends">
                        </span>

                        <span class="extends">
                        </span>
                        
                        </code>
                    </h2>
                    <!-- class tree goes here -->
                    
                
  

                    <div class="summary description">
                        Provides the language utilites and extensions used by the library
                    </div>




                        <div class="section method details">
                            <h3><a name="methodDetails">Methods</a></h3>
                            <div class="content">
                                    <h4>
                                        <a name="augment">augment</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                        void
                                            <strong>augment</strong>
                                           (
                                                
                                                        
                                                         r
                                                    
                                                
                                                        , 
                                                         s
                                                    
                                                
                                                        , 
                                                         arguments
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Applies all prototype properties in the supplier to the receiver if the
receiver does not have these properties yet.  Optionally, one or more
methods/properties can be specified (as additional parameters).  This
option will overwrite the property if receiver has it already.
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>r &lt;Function&gt;</code>
                                                              the object to receive the augmentation
                                                        </dd>
                                                        <dd>
                                                            <code>s &lt;Function&gt;</code>
                                                              the object that supplies the properties to augment
                                                        </dd>
                                                        <dd>
                                                            <code>arguments &lt;String*&gt;</code>
                                                             zero or more properties methods to augment the
receiver with.  If none specified, everything
in the supplier will be used unless it would
overwrite an existing property in the receiver
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="extend">extend</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                        void
                                            <strong>extend</strong>
                                           (
                                                
                                                        
                                                         subc
                                                    
                                                
                                                        , 
                                                         superc
                                                    
                                                
                                                        , 
                                                         overrides
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Utility to set up the prototype, constructor and superclass properties to
support an inheritance strategy that can chain constructors and methods.
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>subc &lt;Function&gt;</code>
                                                               the object to modify
                                                        </dd>
                                                        <dd>
                                                            <code>superc &lt;Function&gt;</code>
                                                             the object to inherit
                                                        </dd>
                                                        <dd>
                                                            <code>overrides &lt;Object&gt;</code>
                                                              additional properties/methods to add to the
subclass prototype.  These will override the
matching items obtained from the superclass 
if present.
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="hasOwnProperty">hasOwnProperty</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>hasOwnProperty</strong>
                                           (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Determines whether or not the property was added
to the object instance.  Returns false if the property is not present
in the object, or was inherited from the prototype.
This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
There is a discrepancy between YAHOO.lang.hasOwnProperty and
Object.prototype.hasOwnProperty when the property is a primitive added to
both the instance AND prototype with the same value:
<pre>
var A = function() {};
A.prototype.foo = 'foo';
var a = new A();
a.foo = 'foo';
alert(a.hasOwnProperty('foo')); // true
alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
</pre>
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;any&gt;</code>
                                                             The object being testing
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd>Boolean</dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="isArray">isArray</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>isArray</strong>
                                           (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Determines whether or not the provided object is an array
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;any&gt;</code>
                                                             The object being testing
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd>Boolean</dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="isBoolean">isBoolean</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>isBoolean</strong>
                                           (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Determines whether or not the provided object is a boolean
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;any&gt;</code>
                                                             The object being testing
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd>Boolean</dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="isFunction">isFunction</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>isFunction</strong>
                                           (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Determines whether or not the provided object is a function
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;any&gt;</code>
                                                             The object being testing
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd>Boolean</dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="isNull">isNull</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>isNull</strong>
                                           (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Determines whether or not the provided object is null
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;any&gt;</code>
                                                             The object being testing
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd>Boolean</dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="isNumber">isNumber</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>isNumber</strong>
                                           (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Determines whether or not the provided object is a legal number
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;any&gt;</code>
                                                             The object being testing
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd>Boolean</dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="isObject">isObject</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>isObject</strong>
                                           (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Determines whether or not the provided object is of type object
or function
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;any&gt;</code>
                                                             The object being testing
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd>Boolean</dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="isString">isString</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>isString</strong>
                                           (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Determines whether or not the provided object is a string
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;any&gt;</code>
                                                             The object being testing
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd>Boolean</dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    <h4>
                                        <a name="isUndefined">isUndefined</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>isUndefined</strong>
                                           (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Determines whether or not the provided object is undefined
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;any&gt;</code>
                                                             The object being testing
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd>Boolean</dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                            </div>
                        </div>







			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div class="module">
                        <h4>Modules</h4>
                        <ul class="content">

                                <li class=""><a href="module_animation.html">animation</a></li>

                                <li class=""><a href="module_autocomplete.html">autocomplete</a></li>

                                <li class=""><a href="module_button.html">button</a></li>

                                <li class=""><a href="module_calendar.html">calendar</a></li>

                                <li class=""><a href="module_connection.html">connection</a></li>

                                <li class=""><a href="module_container.html">container</a></li>

                                <li class=""><a href="module_datasource.html">datasource</a></li>

                                <li class=""><a href="module_datatable.html">datatable</a></li>

                                <li class=""><a href="module_dom.html">dom</a></li>

                                <li class=""><a href="module_dragdrop.html">dragdrop</a></li>

                                <li class=""><a href="module_element.html">element</a></li>

                                <li class=""><a href="module_event.html">event</a></li>

                                <li class=""><a href="module_history.html">history</a></li>

                                <li class=""><a href="module_logger.html">logger</a></li>

                                <li class=""><a href="module_menu.html">menu</a></li>

                                <li class=""><a href="module_slider.html">slider</a></li>

                                <li class=""><a href="module_tabview.html">tabview</a></li>

                                <li class=""><a href="module_treeview.html">treeview</a></li>

                                <li class="selected"><a href="module_yahoo.html">yahoo</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="YAHOO.html">YAHOO</a></li>
                                <li class=""><a href="YAHOO.env.html">YAHOO.env</a></li>
                                <li class="selected"><a href="YAHOO.lang.html">YAHOO.lang</a></li>
                                <li class=""><a href="YAHOO_config.html">YAHOO_config</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="YAHOO.js.html">YAHOO.js</a></li>
                        </ul>
                    </div>


                    <div class="module">
                        <h4>Methods</h4>
                        <ul class="content">        
                                <li><!--<code>void</code>-->
                                <a href="#augment">augment</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#extend">extend</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#hasOwnProperty">hasOwnProperty</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#isArray">isArray</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#isBoolean">isBoolean</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#isFunction">isFunction</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#isNull">isNull</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#isNumber">isNumber</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#isObject">isObject</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#isString">isString</a>
                                </li>
                                <li><!--<code>void</code>-->
                                <a href="#isUndefined">isUndefined</a>
                                </li>
                        </ul>
                    </div>



            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2007 Yahoo! Inc. All rights reserved.
	</div>
</div>
</body>
</html>
